<?php
    if(!isset($_SESSION['user_info']) && empty($_SESSION['user_info'])){
        $page      = $_SERVER['REQUEST_URI'];$cachefile = 'cache/cache_'.md5("$page");$cachetime = 18000;
        $cacheList = array("/gallery","/news/tin-tuc","/news/su-kien","/news/huong-dan");
        if(in_array($page,$cacheList)){
            if (file_exists($cachefile) && time() - $cachetime < filemtime($cachefile)) {
                include($cachefile);exit;
            }
            // if no file or too old, render and capture HTML page.
            ob_start();
        }
    }
    header("Cache-Control: public, must-revalidate"); // HTTP/1.1
    header("Expires: Sat, 26 Jul 2015 05:00:00 GMT"); // Date in the past
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Bá Thiên Địa</title>
        <link rel="Shortcut Icon" href="<?php echo base_url().'static/templates/frontend/event/teaser/images/icon_bathien.png';?>" type="image/x-icon" />        
        <link href="<?php echo base_url().'static/templates/frontend/home/';?>css/styles.css" rel="stylesheet"/>
        <script src="<?php echo base_url().'static/templates/frontend/home/js/jquery-latest.js';?>"></script>
        <script type="text/javascript" src="<?php echo base_url().'static/templates/frontend/home/js/notice.js';?>"></script>
     </head>